<?php


$query_txt="SELECT messages.message,id_message 
		FROM messages 
		LEFT JOIN languages ON messages.id_language=languages.id 
		WHERE languages.language='".$_SESSION['LANGUAGE']."' 
		ORDER BY id_message ASC";
$query=mysql_query($query_txt);


while ( $line = mysql_fetch_array($query) )
	{
	$tpl->assign("sysmsg".$line['id_message'],display_system_messages($line['id_message']));
	}


$query_languages_txt="SELECT * FROM languages ORDER BY language ASC";
$query_languages=mysql_query($query_languages_txt);

while ( $line_language = mysql_fetch_array($query_languages) )
	{
	$tpl->assign("language_id",$line_language['id']);
	$tpl->assign("language",$line_language['language']);
	
	$tpl->parse("main.change_language.row");
	}
$tpl->parse("main.change_language");

?>
